package com.jeff.tianti.cms.service;

import com.jeff.tianti.cms.dao.FriendShipLinkDao;
import com.jeff.tianti.cms.dao.TeachDao;
import com.jeff.tianti.cms.dto.FriendShipLinkDTO;
import com.jeff.tianti.cms.dto.TeachQueryDTO;
import com.jeff.tianti.cms.entity.FriendShipLink;
import com.jeff.tianti.cms.entity.Teach;
import com.jeff.tianti.common.PageBean;
import com.jeff.tianti.common.entity.PageModel;
import com.jeff.tianti.common.service.CommonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @author xujianfang
 * @desc ArticleService类 
 * @date 2017-03-16
 */
@Service
public class TeachService extends CommonService<Teach,String >  {

    @Autowired
    private TeachDao teachDao;

    @Autowired
    public void setArticleDao(TeachDao teachDao){
      super.setCommonDao(teachDao);
    }

    public PageModel<Teach> queryFriendShipLinkPage(TeachQueryDTO teachQueryDTO){
        return this.teachDao.queryTeachPage(teachQueryDTO);
    }

    public void updateSelectiveById(Teach teach){
        this.teachDao.updateSelectiveById(teach);

    }
    public List<Teach> findAllNoDel(){
      return   this.teachDao.findAllNoDel();
    }

    public Page<Teach> findAllNoDelAndPage(Pageable pageable){
      return   this.teachDao.findAllNoDelAndPage(pageable);
    }

    public PageModel<Map<String, Object>> queryTeachList(PageBean pageBean){
      return   this.teachDao.queryTeachList(pageBean);
    }





}